<template>
  <div class="material">
    <Directory ref="materialDirectory" :title="'资料中心'" @groupChange="groupChange" />
    <Tab :group-id="groupId" @reloadGroupList="reloadGroupList" />
  </div>
</template>

<script>
import Tab from './tab.vue'
import Directory from './directory'

export default {
  name: 'Material',
  components: { Directory, Tab },
  data() {
    return {
      groupId: 0
    }
  },
  methods: {
    groupChange(data) {
      this.groupId = data.id
    },
    reloadGroupList() {
      this.$refs.materialDirectory.loadData(1)
    }
  }
}
</script>

<style lang="scss" scoped>
.material{
	width: 1920px;
	background-color: #F6F6F6;
	display: flex;
	border-radius: 8px;
  margin: 0 auto;
}
</style>
